package com.aspire.boc.mms.gwcmp.util.enums;

/**
 * 接入类型枚举
 * 1.彩信  2.短信
 * @author zhanghao
 *
 */
public enum LinkType {

	MMS_TYPE(1,"彩信"), SMS_TYPE(2, "短信");
	
    private LinkType(int key, String value) {
    	this.key = (short)key;
        this.value = value;
    }

    private Short key;
    private String value;

    public static LinkType getByKey(Short key) {
    	
        for (LinkType item : values()) {
            if (item.key.equals(key))
                return item;
        }
        return null;
    }
    
    public static LinkType getByValue(String value) {
    	
        for (LinkType item : values()) {
            if (item.value.equals(value))
                return item;
        }
        return null;
    }

    public String getValue() {

        return this.value;
    }
}
